export const submit = (ipt) => {
  return {
    type: 'submitIpt',
    payload: {
      text: ipt
    }
  }
}
export const initToDoAction = (data) => {
  return {
    type: 'initToDo',
    data: data
  }
}
export const changeAction = (i,complete) => {
  return {
    type: 'completeChange',
    payload: {
      id: i,
      complete: complete
    }
  }
}
export const deleteAction = (id) => {
  return {
    type: 'deleteToDo',
    payload: {
      id:id
    }
  }
}
export const editAction = (id,txt,bool) => {
  return {
    type: 'edit',
    payload: {
      id:id,
      txt:txt,
      bool:bool
    }
  }
}
export const updateAction=(json)=>{
  console.log(json);
  return{
    type:'UPDATE_TODO_LIST',
    payload:json
  }
}
